<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      const fn = () => {
        console.log(123);
      };
      fn();
      const sum = (num1, num2) => num1 + num2; // 函数体只有一句代码 执行结果是函数的返回值省略大括号
      console.log(sum(10, 12));
      // 如果只有一个形参 小括号可以省略
      const f = (v) => v;
      console.log(f(2));
    </script>
  </body>
</html>
